package com.lvmama.task.service.impl;


import com.lvmama.task.common.service.TaskOperationLogService;
import com.lvmama.task.common.vo.TaskOperationLog;
import com.lvmama.task.service.dao.TaskOperationLogDAO;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class TaskOperationLogServiceImpl implements TaskOperationLogService {
    @Autowired
    TaskOperationLogDAO taskOperationLogDAO;

    @Override
    public List<TaskOperationLog> queryByObjectIdMap(Map map) {
        return taskOperationLogDAO.queryByObjectIdMap(map);
    }

    @Override
    public void insert(Long taskId, String type, String name, String content, String operator) {
        TaskOperationLog log = new TaskOperationLog();

        log.setTaskId(taskId);
        log.setType(type);
        log.setName(name);
        log.setContent(content);
        log.setOperator(operator);
        log.setCreateTime(new Date());

        taskOperationLogDAO.insert(log);
    }

    @Override
    public Long queryByObjectIdMapCount(Map map) {
        return taskOperationLogDAO.queryByObjectIdMapCount(map);
    }


}
